// 变量名称就是指令的名字
export const imgerror = {
  inserted: function(el, options) {
    console.log('el', el)
    console.log('options', options)
    el.onerror = () => {
      console.log('图片加载失败,给一个默认的图片')
      el.src = options.value
    }
  }
}

export const focus = {
  inserted: function(el, options) {
    el.focus()
  }
}
